package com.hm.business.vo;

import lombok.Data;


/**
* @Description: controller和service之间的数据传递
* @param
* @return
* @throws
* @author Coder编程
* @date 2021/6/16 17:17
*/
@Data
public class ResultVO<T> {

    private String message;
    private int code;
    private T data;

    public static <T> ResultVO<T> getSuccess(T data) {
        return new <T>ResultVO(200, "调用成功!", data);
    }

    public ResultVO(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public ResultVO(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResultVO() {
    }
}
